import request from "@/utils/request";

const BASE_URL = "/admin-api/grid";

class GridAPI {
  static getGridList(queryParams: any) {
    return request<any, any>({
      url: `${BASE_URL}/getGridList`,
      method: "get",
      params: queryParams,
    });
  }

  static updateGrid(data: any) {
    return request<any, any>({
      url: `${BASE_URL}/update`,
      method: "put",
      data,
    });
  }

  static deleteGrid(id: number) {
    return request<any, any>({
      url: `${BASE_URL}/delete/${id}`,
      method: "delete",
    });
  }

  static addGrid(data: any) {
    return request<any, any>({
      url: `${BASE_URL}/add`,
      method: "post",
      data,
    });
  }
}

export default GridAPI;
